<template>
	<view>
		<u-sticky bgColor="#fff">
			<view class="dingbu">
				<view class="" :style="{paddingTop:menutop+'rpx'}">
					<view class="">
						<view class="ershiba xiaocheng">
							<text class="ershiba xiaolv">青呼我为</text>
						</view>
					</view>
					<!-- <view class="flexbetween margin_top">
						<view class="flexleft"
							style="padding:15rpx 30rpx;background: #FFFFFF;border-radius: 12rpx;border: 1rpx solid #FFFFFF;width: 65%;">
							<view class="margin_right1">
								<u-icon name="search" size="28"></u-icon>
							</view>
							<input placeholder="输入关键词" type="text" />
						</view>
						<view class="flexright">
							<image style="width: 25rpx;height: 26rpx;margin-right: 6rpx;"
								src="../../static/image/system/jb.png" mode="">
							</image>
							<view class="strongtext xiaohei">青统币:
								<text class="titletext xiaohei ">107</text>
							</view>
						</view>
					</view> -->
				</view>
			</view>
		</u-sticky>
		<view class="mainpadding">
			<!-- 我的留言 -->
			<view class="">
				<view class="flexcenter">
					<image class="margin_right1" style="width: 38rpx;height: 38rpx;"
						src="../../static/image/system/zxx.png" mode=""></image>
					<view class="sanshier fonweight xiaohei margin_right1">我的留言</view>
					<image class="" style="width: 38rpx;height: 38rpx;" src="../../static/image/system/yxx.png" mode="">
					</image>
				</view>
				<view class="jrbox margin_top">
					<view class="ershiba xiaohei">青，你对衢江发展意见建议或者希望举办的活动都可以给我们留言哦~</view>
					<textarea style="height: 100rpx;width: 100%;" class="margin_top2" placeholder="留言内容"
						v-model="des"></textarea>
					<view class="flexright">
						<view class="xbcun flexcenter margin_top2" @click="submit">保存</view>
					</view>
				</view>
			</view>
			<!-- 信息 -->
			<view class="margin_top radius ffffff mainpadding flexbetween"
				style="border: 2rpx solid rgba(255,45,45,0.4);" @click="jumpurl('/pages/qinglaishuo/chakanly')">
				<view class="flexleft">
					<image class="margin_right2" style="width: 48rpx;height: 48rpx;"
						src="../../static/image/system/dp.png" mode=""></image>
					<view class="ershil xiaocheng">查看留言</view>
				</view>
				<u-icon name="arrow-right" color="#666666"></u-icon>
			</view>
			<!--我有事说  -->
			<view class=" margin_top">
				<view class="flexcenter" @click="jumpurl('/pages/qinglaishuo/shijiansb')">
					<image class="margin_right1" style="width: 38rpx;height: 38rpx;"
						src="../../static/image/system/zxx.png" mode=""></image>
					<view class="sanshier fonweight xiaohei margin_right1">我有事说</view>
					<image class="" style="width: 38rpx;height: 38rpx;" src="../../static/image/system/yxx.png" mode="">
					</image>
				</view>
				<view class="jrbox1 margin_top" @click="jumpurl('/pages/qinglaishuo/shijiansb')">
					<view class="sanshier xiaocheng fonweight">我有事说</view>
					<view class="ershil margin_top1" style="color: #FF8E7E;">社区问题从我发现</view>
				</view>
				<view class="margin_top radius ffffff mainpadding flexbetween"
					style="border: 2rpx solid rgba(255,45,45,0.4);" @click="jumpurl('/pages/qinglaishuo/wentilieb')">
					<view class="flexleft">
						<image class="margin_right2" style="width: 48rpx;height: 48rpx;"
							src="../../static/image/system/dp.png" mode=""></image>
						<view class="ershil xiaocheng">查看问题记录</view>
					</view>
					<u-icon name="arrow-right" color="#666666"></u-icon>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				menutop: 0,
				des: ""
			}
		},
		onLoad() {
			// #ifdef MP-WEIXIN
			this.menutop = uni.getMenuButtonBoundingClientRect().top * 2
			// #endif
		},
		methods: {
			submit() {
				if (!httpRequest.checkIsLogin()) {
					uni.navigateTo({
						url: "/pages/login"
					})
					return false
				}
				if (this.des == "") {
					httpRequest.toast("请输入留言内容")
					return false
				}
				uni.showLoading({
					mask:true,
					title:"请稍后"
				})
				httpRequest.request('/api/user/addFeddback', 'GET', {
					des: this.des,
				}, false, false, true).then(res => {
					uni.hideLoading()
					httpRequest.toast(res.msg)
					if (res.code == 1) {
						this.des = ""
					}
				})
			},
			jumpurl(url){
				if (!httpRequest.checkIsLogin()) {
					uni.navigateTo({
						url: "/pages/login"
					})
					return false
				}
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.xbcun {
		width: 136rpx;
		height: 52rpx;
		font-weight: 500;
		font-size: 32rpx;
		color: #FFFFFF;
		background: #FF4609;
		border-radius: 26rpx 26rpx 26rpx 26rpx;
	}

	.jrbox1 {
		background-image: url('../../static/image/system/ys.png');
		background-size: 100% 100%;
		box-sizing: border-box;
		width: 100%;
		padding: 34rpx 0 46rpx 152rpx;
	}

	.jrbox {
		background-image: url('../../static/image/system/bk.png');
		background-size: 100% 100%;
		box-sizing: border-box;
		width: 100%;
		padding: 40rpx;
	}

	.dingbu {
		padding: 0 30rpx 30rpx;
		background-size: 100% 100%;
		width: 100%;
		box-sizing: border-box;
		background-image: url('../../static/image/system/toub.png');
	}
</style>